package com.weilx959.spt.core.constants;

import com.jfoenix.controls.*;
import com.weilx959.spt.core.component.*;
import javafx.stage.DirectoryChooser;
import javafx.stage.FileChooser;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum FieldEnum {
    /**
     * 文本框
     */
    TEXT_FIELD(JFXTextField.class, TextFieldFormItemControl.class),
    /**
     * 文本域
     */
    TEXT_AREA(JFXTextArea.class, null),
    /**
     * 密码框
     */
    PASSWORD_FIELD(JFXPasswordField.class, PasswordFormItemControl.class),
    /**
     * 单选框
     */
    RADIO_BUTTON(JFXRadioButton.class, RadioButtonFormItemControl.class),
    /**
     * 复选框
     */
    CHECK_BOX(JFXCheckBox.class, CheckBoxFormItemControl.class),
    /**
     * 下拉框
     */
    SELECT_FIELD(JFXComboBox.class, ComboBoxFormItemControl.class),
    /**
     * 日期框
     */
    DATE_FIELD(JFXDatePicker.class, null),
    /**
     * 时间框
     */
    TIME_FIELD(JFXTimePicker.class, null),
    /**
     * 开关按钮
     */
    TOGGLE_BUTTON(JFXToggleButton.class, ToggleButtonFormItemControl.class),
    /**
     * 文件选择器
     */
    FILE_CHOOSER(FileChooser.class, FileChooserFormItemControl.class),
    /**
     * 目录选择器
     */
    DIRECTORY_CHOOSER(DirectoryChooser.class, DirChooserFormItemControl.class);

    private final Class<?> clazz;

    private final Class<? extends FormItemControl> formItemControlClass;
}
